{% extends "zinnia/entry_list.html" %}
{% load i18n %}

{% block title %}{% trans "Search results" %} {% if pattern %}'{{ pattern }}'{% endif %}{% endblock %}

{% block link %}
  {{ block.super }}
  <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of search result of" %} '{{ pattern }}'" href="{% url zinnia_entry_search_feed pattern %}" />
{% endblock %}

{% block content %}
<h1>{% trans "Search results" %} {% if pattern %}'{{ pattern }}'{% endif %}</h1>

{% if error %}
<p class="error">{{ error }}</p>
{% endif %}

{% if object_list %}
<p class="success">
  {% blocktrans count object_list.count as entry_count %}{{ entry_count }} entry found{% plural %}{{ entry_count }} entries found{% endblocktrans %}
</p>
{% endif %}

{% for object in object_list %}
<div id="entry-{{ object.pk }}" class="hentry{% if object.featured %} featured{% endif %} span-16 last">
  {% with object.html_content|truncatewords_html:100|safe as object_content %}
  {% include "zinnia/_entry_detail.html" %}
  {% endwith %}
</div>
<hr />
{% empty %}
<p class="notice">{% trans "Nothing found." %}</p>
{% endfor %}
{% endblock %}
